using FluentNHibernate.Mapping;
using Subfaculty.Common.Entities;

namespace Subfaculty.Infrastructure.Repositories.Mapping
{
	public class StudyPlanItemMapping : ClassMap<StudyPlanItem>
	{
		public StudyPlanItemMapping()
		{
			Id(x => x.Id).GeneratedBy.Identity();

			References(x => x.Department).Cascade.SaveUpdate();
			References(x => x.Discipline).Cascade.SaveUpdate();
			References(x => x.Semester).Cascade.SaveUpdate();
				
			Map(x => x.HoursLab);
			Map(x => x.HoursLecture);
			Map(x => x.HoursPractice);
			Map(x => x.HoursSRS);
			Map(x => x.EStudyControl);
			Map(x => x.ETypeSRS);
		}
	}
}